import 'package:Flutter/dotcon/splash.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import '../test.dart';
import 'bottom_navigation_demo.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await SystemChrome.setPreferredOrientations(
    [
      DeviceOrientation.portraitUp,   // 竖屏 Portrait 模式
      DeviceOrientation.portraitDown,
      // DeviceOrientation.landscapeLeft, // 横屏 Landscape 模式
      // DeviceOrientation.landscapeRight,
    ],
  );
  runApp(const App());
}

class App extends StatelessWidget {
  const App({Key? key,});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      initialRoute: '/',
      routes: {
        "/":(context) => BottomNavigationPage(),
        "/splash":(context) => const SplashPage(),
      },
      theme: ThemeData(
          textTheme: TextTheme(
              bodyText1: TextStyle(
                  inherit: false,
                  color: Colors.white,
                  fontSize: 20
              )
          )
      ),
    );
  }
}